<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="thx" uri="/thx-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<section class="content-header">
	<h1>
		我的工作<small>工单管理</small>
	</h1>
	<ol class="breadcrumb">
		<li><a href="#"><i class="fa fa-dashboard"></i>主页</a></li>
		<li><a href="#">工单管理</a></li>
		<li class="active">我的工作</li>
	</ol>
</section>

<section class="content">
	<div class="nav-tabs-custom">
	    <!-- Nav tabs -->
	    <ul class="nav nav-tabs" role="tablist">
	        <li role="presentation" class="active" >
	            <a href="#todo-work" aria-controls="home" load-url="${pageContext.request.contextPath}/workflow/todo!list.action?entity.todoType=ticket" role="tab" data-toggle="tab">
	               	待办工作
	            </a>
	        </li>
	        <li role="presentation">
	            <a href="#have-todo-work" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/haveTodo!haveTodoRunWork.action?entity.workType=ticket&officeDocTypeAppIds=${officeDocTypeAppIds}&state=end" role="tab" data-toggle="tab">
	            	已办工作
	            </a>
	        </li>
	        <li role="presentation">
	            <a href="#drafts-work" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/mywork!list.action?entity.workState=start&entity.workType=ticket&officeDocTypeAppIds=${officeDocTypeAppIds}" role="tab" data-toggle="tab">
	            	草稿工作
	            </a>
	        </li>
	        <li role="presentation">
	            <a href="#my-work" aria-controls="profile"  load-url="${pageContext.request.contextPath}/workflow/mywork!list.action?entity.workState=noStart&entity.workType=ticket&officeDocTypeAppIds=${officeDocTypeAppIds}" role="tab" data-toggle="tab">
	            	我起草的工作
	            </a>
	        </li>
	    </ul>
	    <!-- Tab panes -->
	    <div class="tab-content">
	        <div role="tabpanel" class="tab-pane active" id="todo-work"></div>
	        <div role="tabpanel" class="tab-pane" id="have-todo-work"></div>
	        <div role="tabpanel" class="tab-pane" id="drafts-work"></div>
	        <div role="tabpanel" class="tab-pane" id="my-work"></div>
	    </div>
	</div>
</section>

<script>
  	$(".nav-tabs li a[load-url!='']").click(function() {
   		var url = $(this).attr("load-url");
   		if(url){
   			util.ajaxPage(url, null, null, ".tab-content .active");
   		}
   	});
	$(".nav-tabs li.active a[load-url!='']").trigger("click");
</script>
